{% extends "base.html" %}

{% block title %}Change you password{% endblock %}

{% block content %}
<div class="account-wrap">
    <div class="container ac-wrap">
        <h1 class="text-center aw-head">
            Change you password
        </h1>

        {% if form.errors %}
            <!-- Error messaging -->
            <div class="notice error">
                <p>There were some error(s) in the information you entered:</p>
                {{ form.non_field_errors }}
                <ul>
                    {% for field in form %}
                        {% if field.errors %}
                            <li>{{ field.label }}: {{ field.errors|striptags }}</li>
                        {% endif %}
                    {% endfor %}
                </ul>
            </div>
            <!-- /Error messaging -->
        {% endif %}

        <form action="." method="post" class="ac-form">
            {% for field in form %}
                <div class="form-group">
                    {{ field.label_tag }} {{ field }}

                    {% if field.help_text %}
                        <div class="help-text">
                        {{ field.help_text|safe }}
                        </div>
                    {% endif %}
                </div>
            {% endfor %}

            <input type="submit" class="btn btn-primary" value="Change Your Password" />
            {% csrf_token %}
        </form>
    </div>
</div>
{% endblock %}
